home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / Booting Gallery / Booting Gallery (source) / Sources / Blasteroids / BlasteroidsGame.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-22  |  964 b   |  48 lines  |  [TEXT/CWIE]

  1. #ifndef __BlasteroidsGame_H__
  2. #define __BlasteroidsGame_H__
  3.  
  4. /***
  5.  *     Created by Bill Hubauer on Fri, Jun 21, 1996 @ 2:25 AM.
  6.  *
  7.  ***/
  8.  
  9. #ifndef __SpriteGame_H__
  10. #include "SpriteGame.h"
  11. #endif
  12.  
  13.  
  14. class CBlasteroidsGame : public CSpriteGame
  15. {
  16. public:
  17.     CBlasteroidsGame();
  18.     virtual ~CBlasteroidsGame();
  19.  
  20.     virtual OSErr        Initialize();
  21.     virtual void        DrawBackground(const Rect& inBounds);
  22. protected:
  23.     virtual CSprite*    MakeExtensionSprite(GWorldPtr image,RgnHandle mask) ; //Override
  24. };
  25.  
  26. class CBlasteroidTargetSprite : public CGameSprite
  27. {
  28. public:
  29.     CBlasteroidTargetSprite(CSpriteWorld* world,CSpriteGame* game,GWorldPtr image,
  30.                         RgnHandle mask);
  31.     virtual ~CBlasteroidTargetSprite();
  32.     
  33.     
  34.     virtual    void    UpdatePosition() ; //Override
  35.     virtual    Boolean    WasHitBy(CSprite* hitByThis);
  36.     
  37. protected:
  38.  
  39.     enum { kBlasteroidTargetStartTop = 200, kBlasteroidTargetStartLeft = 0};
  40.     enum { kMoveHInterval = 5, kMoveVInterval = 5 };
  41.     
  42.     short fDeltaH;
  43.     short fDeltaV;
  44. };
  45.  
  46.  
  47. #endif
  48.